package com.cordys.coe.salesforce.metadata.metadata;

import java.io.UnsupportedEncodingException;

import javax.wsdl.WSDLException;
import javax.xml.XMLConstants;
import javax.xml.namespace.QName;

import com.cordys.coe.salesforce.metadata.xsd.XSDElement;
import com.cordys.coe.salesforce.metadata.xsd.XSDRestriction;
import com.cordys.coe.salesforce.metadata.xsd.XSDSchema;
import com.cordys.coe.salesforce.metadata.xsd.XSDSequence;
import com.cordys.coe.salesforce.metadata.xsd.XSDType;
import com.eibus.xml.nom.Document;
import com.eibus.xml.nom.Node;
import com.eibus.xml.nom.XMLException;
import com.eibus.xml.xpath.XPath;

/**
 * @author Senthil Kumar Murugesan
 * 
 */
public class SchemaGenerator {
	/**
	 * Holds the XSD definition of a base64Binary.
	 */
	protected static final String XSD_BASE64_BINARY = "base64Binary";
	/**
	 * Holds the XSD definition of a double.
	 */
	protected static final String XSD_DOUBLE = "double";
	/**
	 * Holds the XSD definition of a int.
	 */
	protected static final String XSD_INT = "int";
	/**
	 * Holds the XSD definition of a decimal.
	 */
	protected static final String XSD_DECIMAL = "decimal";
	/**
	 * Holds the XSD definition of a string.
	 */
	protected static final String XSD_STRING = "string";

	protected String m_namespace = "";

	public String getNamespace() {
		return m_namespace;
	}

	public void setNamespace(String m_namespace) {
		this.m_namespace = m_namespace;
	}

	protected void generateSimpleDataType(XSDElement element,
			SFDataType dataType, int fieldLength, int decimalLength) {
		switch (dataType) {
		case NUM:

			XSDType type = new XSDType();
			element.setType(type);
			type.setBaseRef(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,
					XSD_STRING));

			XSDRestriction restriction = new XSDRestriction();
			type.setRestriction(restriction);
			restriction.setPattern("\\d+");
			restriction.setMaxLength(Integer.toString(fieldLength));

			break;

		case DATE:
			type = new XSDType();
			element.setType(type);
			type.setBaseRef(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,
					XSD_STRING));

			restriction = new XSDRestriction();
			type.setRestriction(restriction);

			restriction.setPattern("....-..-..");

			break;

		case TIME:
			type = new XSDType();
			element.setType(type);
			type.setBaseRef(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,
					XSD_STRING));

			restriction = new XSDRestriction();
			type.setRestriction(restriction);

			restriction.setPattern("\\d\\d-\\d\\d-\\d\\d");

			break;

		case INT:
			element.setTypeRef(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,
					XSD_INT));
			break;

		case UNSIGNED_BYTE:
			element.setTypeRef(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,
					"unsignedByte"));
			break;

		case FLOAT:
			element.setTypeRef(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,
					XSD_DOUBLE));
			break;

		case BINARY:
			type = new XSDType();
			element.setType(type);
			type.setBaseRef(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,
					XSD_BASE64_BINARY));

			restriction = new XSDRestriction();
			type.setRestriction(restriction);

			restriction.setLength(Integer.toString(fieldLength));

			break;

		case STRING:
			type = new XSDType();
			element.setType(type);
			type.setBaseRef(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,
					XSD_STRING));

			restriction = new XSDRestriction();
			type.setRestriction(restriction);

			restriction.setMaxLength(Integer.toString(fieldLength));
			break;

		default:
			element.setTypeRef(new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,
					XSD_STRING));
			break;
		}
	}

	public SchemaGenerator(String nameSpace) {
		m_namespace = nameSpace;
	}

	public XSDSchema generateInputSchema(XSDSchema xs,
			XSDSequence methodSequence, int inputXML) {
		// m_namespace = "http://schemas.cordys.com/bac/bancs";
		// int[] templates = Find.match(inputXML, "?<DescribeSObjectResult>");
		int objType = XPath.getFirstMatch(".//DescribeSObjectResult", null,
				inputXML);
		String objName = Node.getDataWithDefault(
				XPath.getFirstMatch(".//name", null, objType), "");

		XSDElement element = new XSDElement();
		element.setName(new QName(m_namespace, objName));
		// xs.addElement(element);

		XSDType type = new XSDType();
		type.setType(XSDType.TYPE_COMPLEX);

		element.setType(type);

		methodSequence.addElement(element);

		XSDSequence templateSequence = new XSDSequence();
		type.setSequence(templateSequence);

		int[] fields = XPath.getMatchingNodes(".//fields", null, objType);
		for (int j = 0; j < fields.length; j++) {
			String fieldName = Node.getDataWithDefault(
					XPath.getFirstMatch(".//name", null, fields[j]), "");
			String length = Node.getDataWithDefault(
					XPath.getFirstMatch(".//length", null, fields[j]), "");
			String dataType = Node.getDataWithDefault(
					XPath.getFirstMatch(".//type", null, fields[j]), "");
			XSDElement field = new XSDElement();
			field.setName(new QName(m_namespace, fieldName));
			templateSequence.addElement(field);
			generateSimpleDataType(field, SFDataType.mapSFDataType(dataType),
					Integer.parseInt(length), 0);
		}

		return xs;

	}

	public static void main(String[] args) throws XMLException,
			UnsupportedEncodingException, WSDLException {
//		String xml = "<data>  <DescribeSObjectsResponse xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/' xmlns='http://schemas.cordys.com/coe/salesforce'>    <DescribeSObjectResult>      <name>Account</name>      <label>Account</label>      <fields>        <autonumber>false</autonumber>        <byteLength>18</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>false</createable>        <custom>false</custom>        <defaultedOnCreate>true</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>true</idLookup>        <inlineHelpText />        <label>Account ID</label>        <length>18</length>        <name>Id</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>false</nillable>        <permissionable>false</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>ID</soapType>        <sortable>true</sortable>        <type>id</type>        <unique>false</unique>        <updateable>false</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>0</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>false</createable>        <custom>false</custom>        <defaultedOnCreate>true</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Deleted</label>        <length>0</length>        <name>IsDeleted</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>false</nillable>        <permissionable>false</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>_boolean</soapType>        <sortable>true</sortable>        <type>_boolean</type>        <unique>false</unique>        <updateable>false</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>18</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>false</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Master Record ID</label>        <length>18</length>        <name>MasterRecordId</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>false</permissionable>        <precision>0</precision>        <relationshipName>MasterRecord</relationshipName>        <relationshipOrder>0</relationshipOrder>        <referenceTo>Account</referenceTo>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>ID</soapType>        <sortable>true</sortable>        <type>reference</type>        <unique>false</unique>        <updateable>false</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>765</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Account Name</label>        <length>255</length>        <name>Name</name>        <nameField>true</nameField>        <namePointing>false</namePointing>        <nillable>false</nillable>        <permissionable>false</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>120</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Account Type</label>        <length>40</length>        <name>Type</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <picklistValues>          <label>Prospect</label>          <value>Prospect</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Customer - Direct</label>          <value>Customer - Direct</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Customer - Channel</label>          <value>Customer - Channel</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Channel Partner / Reseller</label>          <value>Channel Partner / Reseller</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Installation Partner</label>          <value>Installation Partner</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Technology Partner</label>          <value>Technology Partner</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Other</label>          <value>Other</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>picklist</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>18</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Parent Account ID</label>        <length>18</length>        <name>ParentId</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName>Parent</relationshipName>        <relationshipOrder>0</relationshipOrder>        <referenceTo>Account</referenceTo>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>ID</soapType>        <sortable>true</sortable>        <type>reference</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>765</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Billing Street</label>        <length>255</length>        <name>BillingStreet</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>textarea</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>120</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Billing City</label>        <length>40</length>        <name>BillingCity</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>60</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Billing State/Province</label>        <length>20</length>        <name>BillingState</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>60</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Billing Zip/Postal Code</label>        <length>20</length>        <name>BillingPostalCode</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>120</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Billing Country</label>        <length>40</length>        <name>BillingCountry</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>765</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Shipping Street</label>        <length>255</length>        <name>ShippingStreet</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>textarea</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>120</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Shipping City</label>        <length>40</length>        <name>ShippingCity</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>60</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Shipping State/Province</label>        <length>20</length>        <name>ShippingState</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>60</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Shipping Zip/Postal Code</label>        <length>20</length>        <name>ShippingPostalCode</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>120</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Shipping Country</label>        <length>40</length>        <name>ShippingCountry</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>120</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Account Phone</label>        <length>40</length>        <name>Phone</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>phone</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>120</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Account Fax</label>        <length>40</length>        <name>Fax</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>phone</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>120</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Account Number</label>        <length>40</length>        <name>AccountNumber</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>765</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Website</label>        <length>255</length>        <name>Website</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>url</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>60</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>SIC Code</label>        <length>20</length>        <name>Sic</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>120</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Industry</label>        <length>40</length>        <name>Industry</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <picklistValues>          <label>Agriculture</label>          <value>Agriculture</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Apparel</label>          <value>Apparel</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Banking</label>          <value>Banking</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Biotechnology</label>          <value>Biotechnology</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Chemicals</label>          <value>Chemicals</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Communications</label>          <value>Communications</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Construction</label>          <value>Construction</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Consulting</label>          <value>Consulting</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Education</label>          <value>Education</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Electronics</label>          <value>Electronics</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Energy</label>          <value>Energy</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Engineering</label>          <value>Engineering</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Entertainment</label>          <value>Entertainment</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Environmental</label>          <value>Environmental</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Finance</label>          <value>Finance</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Food &amp; Beverage</label>          <value>Food &amp; Beverage</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Government</label>          <value>Government</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Healthcare</label>          <value>Healthcare</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Hospitality</label>          <value>Hospitality</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Insurance</label>          <value>Insurance</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Machinery</label>          <value>Machinery</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Manufacturing</label>          <value>Manufacturing</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Media</label>          <value>Media</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Not For Profit</label>          <value>Not For Profit</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Recreation</label>          <value>Recreation</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Retail</label>          <value>Retail</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Shipping</label>          <value>Shipping</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Technology</label>          <value>Technology</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Telecommunications</label>          <value>Telecommunications</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Transportation</label>          <value>Transportation</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Utilities</label>          <value>Utilities</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Other</label>          <value>Other</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>picklist</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>0</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>false</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Annual Revenue</label>        <length>0</length>        <name>AnnualRevenue</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>18</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>_double</soapType>        <sortable>true</sortable>        <type>currency</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>0</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>8</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Employees</label>        <length>0</length>        <name>NumberOfEmployees</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>_int</soapType>        <sortable>true</sortable>        <type>_int</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>120</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Ownership</label>        <length>40</length>        <name>Ownership</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <picklistValues>          <label>Public</label>          <value>Public</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Private</label>          <value>Private</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Subsidiary</label>          <value>Subsidiary</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Other</label>          <value>Other</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>picklist</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>60</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Ticker Symbol</label>        <length>20</length>        <name>TickerSymbol</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>96000</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>false</filterable>        <formula />        <groupable>false</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Account Description</label>        <length>32000</length>        <name>Description</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>false</sortable>        <type>textarea</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>120</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Account Rating</label>        <length>40</length>        <name>Rating</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <picklistValues>          <label>Hot</label>          <value>Hot</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Warm</label>          <value>Warm</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Cold</label>          <value>Cold</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>picklist</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>240</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Account Site</label>        <length>80</length>        <name>Site</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>18</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>true</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Owner ID</label>        <length>18</length>        <name>OwnerId</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>false</nillable>        <permissionable>false</permissionable>        <precision>0</precision>        <relationshipName>Owner</relationshipName>        <relationshipOrder>0</relationshipOrder>        <referenceTo>User</referenceTo>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>ID</soapType>        <sortable>true</sortable>        <type>reference</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>0</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>false</createable>        <custom>false</custom>        <defaultedOnCreate>true</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>false</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Created Date</label>        <length>0</length>        <name>CreatedDate</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>false</nillable>        <permissionable>false</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>dateTime</soapType>        <sortable>true</sortable>        <type>datetime</type>        <unique>false</unique>        <updateable>false</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>18</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>false</createable>        <custom>false</custom>        <defaultedOnCreate>true</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Created By ID</label>        <length>18</length>        <name>CreatedById</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>false</nillable>        <permissionable>false</permissionable>        <precision>0</precision>        <relationshipName>CreatedBy</relationshipName>        <relationshipOrder>0</relationshipOrder>        <referenceTo>User</referenceTo>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>ID</soapType>        <sortable>true</sortable>        <type>reference</type>        <unique>false</unique>        <updateable>false</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>0</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>false</createable>        <custom>false</custom>        <defaultedOnCreate>true</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>false</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Last Modified Date</label>        <length>0</length>        <name>LastModifiedDate</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>false</nillable>        <permissionable>false</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>dateTime</soapType>        <sortable>true</sortable>        <type>datetime</type>        <unique>false</unique>        <updateable>false</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>18</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>false</createable>        <custom>false</custom>        <defaultedOnCreate>true</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Last Modified By ID</label>        <length>18</length>        <name>LastModifiedById</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>false</nillable>        <permissionable>false</permissionable>        <precision>0</precision>        <relationshipName>LastModifiedBy</relationshipName>        <relationshipOrder>0</relationshipOrder>        <referenceTo>User</referenceTo>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>ID</soapType>        <sortable>true</sortable>        <type>reference</type>        <unique>false</unique>        <updateable>false</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>0</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>false</createable>        <custom>false</custom>        <defaultedOnCreate>true</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>false</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>System Modstamp</label>        <length>0</length>        <name>SystemModstamp</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>false</nillable>        <permissionable>false</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>dateTime</soapType>        <sortable>true</sortable>        <type>datetime</type>        <unique>false</unique>        <updateable>false</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>0</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>false</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Last Activity</label>        <length>0</length>        <name>LastActivityDate</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>false</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>date</soapType>        <sortable>true</sortable>        <type>date</type>        <unique>false</unique>        <updateable>false</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>60</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Data.com Key</label>        <length>20</length>        <name>Jigsaw</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>60</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>false</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Jigsaw Company ID</label>        <length>20</length>        <name>JigsawCompanyId</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>false</permissionable>        <precision>0</precision>        <relationshipName>JigsawCompany</relationshipName>        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>false</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>120</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Account Source</label>        <length>40</length>        <name>AccountSource</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <picklistValues>          <label>Web</label>          <value>Web</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Phone Inquiry</label>          <value>Phone Inquiry</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Partner Referral</label>          <value>Partner Referral</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Purchased List</label>          <value>Purchased List</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Other</label>          <value>Other</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>picklist</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>240</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>false</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>SIC Description</label>        <length>80</length>        <name>SicDesc</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>765</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>true</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Customer Priority</label>        <length>255</length>        <name>CustomerPriority__c</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <picklistValues>          <label>High</label>          <value>High</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Low</label>          <value>Low</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Medium</label>          <value>Medium</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>picklist</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>765</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>true</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>SLA</label>        <length>255</length>        <name>SLA__c</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <picklistValues>          <label>Gold</label>          <value>Gold</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Silver</label>          <value>Silver</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Platinum</label>          <value>Platinum</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Bronze</label>          <value>Bronze</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>picklist</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>765</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>true</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Active</label>        <length>255</length>        <name>Active__c</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <picklistValues>          <label>No</label>          <value>No</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Yes</label>          <value>Yes</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>picklist</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>0</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>true</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>false</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Number of Locations</label>        <length>0</length>        <name>NumberofLocations__c</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>3</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>_double</soapType>        <sortable>true</sortable>        <type>_double</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>765</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>true</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>Upsell Opportunity</label>        <length>255</length>        <name>UpsellOpportunity__c</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <picklistValues>          <label>Maybe</label>          <value>Maybe</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>No</label>          <value>No</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <picklistValues>          <label>Yes</label>          <value>Yes</value>          <active>true</active>          <defaultValue>false</defaultValue>        </picklistValues>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>picklist</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>30</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>true</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>SLA Serial Number</label>        <length>10</length>        <name>SLASerialNumber__c</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>string</soapType>        <sortable>true</sortable>        <type>string</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>      <fields>        <autonumber>false</autonumber>        <byteLength>0</byteLength>        <calculated>false</calculated>        <caseSensitive>false</caseSensitive>        <controllerName />        <createable>true</createable>        <custom>true</custom>        <defaultedOnCreate>false</defaultedOnCreate>        <defaultValueFormula />        <dependentPicklist>false</dependentPicklist>        <deprecatedAndHidden>false</deprecatedAndHidden>        <digits>0</digits>        <displayLocationInDecimal>false</displayLocationInDecimal>        <filterable>true</filterable>        <formula />        <groupable>true</groupable>        <htmlFormatted>false</htmlFormatted>        <idLookup>false</idLookup>        <inlineHelpText />        <label>SLA Expiration Date</label>        <length>0</length>        <name>SLAExpirationDate__c</name>        <nameField>false</nameField>        <namePointing>false</namePointing>        <nillable>true</nillable>        <permissionable>true</permissionable>        <precision>0</precision>        <relationshipName />        <relationshipOrder>0</relationshipOrder>        <restrictedPicklist>false</restrictedPicklist>        <scale>0</scale>        <soapType>date</soapType>        <sortable>true</sortable>        <type>date</type>        <unique>false</unique>        <updateable>true</updateable>        <writeRequiresMasterRead>false</writeRequiresMasterRead>      </fields>    </DescribeSObjectResult>  </DescribeSObjectsResponse></data>";
//		Document doc = new Document();
//		int inputXML = doc.parseString(xml);
//		int fieldDef = XPath.getFirstMatch(".//fields[name='Id']/type", null, inputXML);
//		System.out.println(Node.writeToString(fieldDef, true));
		//MethodGenerator mg = new MethodGenerator("Account", "create","http://schemas.cordys.com/bancs/");
		//String wsdl = mg.generateWSDL(inputXML, inputXML);
		//System.out.println(wsdl);

	}

}
